{include file="index@public/header" /}
<style type="text/css">
    ::-webkit-scrollbar{
        width:8px;
        height: 6px;
    }
    ::-webkit-scrollbar-thumb{
        border-radius: 10px;
        box-shadow: 0 0 1px rgb(255 255 255 / 50%);
        background-color: rgba(0, 0, 0, .2);
    }
    ::-webkit-scrollbar-track-piece{
        border-radius: 10px;
        box-shadow: 0 0 1px rgb(255 255 255 / 50%);
        background-color: #ededed;
    }

    @media screen and (min-width: 768px) {
        .pc-list{display: block;}
        .phone-list{display: none;}
        .phone-balllist-tab{display: none;}
    }
    @media screen and (max-width: 768px) {
        .pc-list{display: none;}
        .phone-list{display: block;}
        .phone-balllist-tab{display: block;}
    }

    .selall img{float: left;margin-top:2px;}
    .selzhi{
        color:#36648a;text-decoration:none;font: 12px/14px arial,helvetica,sans-serif;
        display: inline-block;
        width:100%;
        float: left;
    }
    /*.selzhi:hover{
       background-color: #36648a;
    }*/
    /*.selall:hover{
      background-color: #36648a;
    }*/
    .selall:hover{
        background-color: #36648a;
    }
    .selall:hover a{
        color: #ffffff;
    }
    body{background-color:#ffffff}
    .gaol{background-color: #EFEFEF;}
    .delail_list{margin-top:10px;cursor:pointer;}
    .Part_No {color:#36648a;}
    .delail_list .price-a{color:#19792f}
    .delail_list:hover{background-color: #36648a;}
    .delail_list:hover div {color:#ffffff;background-color: #36648a;}

    #gengduoli {padding: 3px;}
    #gengduoli>.gengduoli,  #gengduoli1>.gengduoli {
        text-align: justify;
        max-width: 1230px;
        width: 98%;
    }
    #gengduoli>.gengduoli *{
        margin: unset;
        padding: revert;
    }

    #gengduoli1>.gengduoli *{
        margin: unset;
        padding: revert;
        list-style: revert;
    }
    .balllist .balllist-a a{display:block;}
    .balllist .balllist-a a:hover{color:#36648A;}
    .balllist .balllist-a a:hover .plist{border:1px solid #36648A;}
    .balllist-a{
        padding: 5px 8px;
        font-family: Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
    }
    .balllist-h{
        margin-left: 5px;
        padding-bottom:2px;
    }

    .plist{
        height: 100px;
        border:1px solid #ccc;
        border-radius: 8px;
        padding:10px 5px 5px 5px;
        display: flex;
    }
    .plist-left{
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .plist-right{
        flex:3;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .plist-title{
        width: 100%;
        padding-bottom: 5px;
        font: 14px/16px Titillium Web,sans-serif;
    }

    .plist-desc{
        color: #333;
        line-height:16px;
    }
    .plist-icon img{
        max-height: 75%;
        max-width: 75%;
        object-fit: contain;
        object-position: 50% 50%;
    }
    .balllist a{text-decoration:none;}

    #search {
        margin:10px 0 60px;
        width: 290px;
        color: #000;
        font-weight: 500;
        width: 800px;
    }
    #search .input-box {
        position: absolute;
        width: inherit;
        height: 42px;
        box-shadow: 0 2px 8px 1px rgb(64 60 67 / 24%);
    }
    #search input {
        height: inherit;
        border: 2px solid #d9e8ee;
        padding: 0 45px 0 20px;
    }
    #search .input-box-right {
        width: 38px;
        height: 38px;
        margin-top: -40px;
        /* background-color: #ff6600; */
        background-color: rgb(255, 150, 0);
        box-shadow: 0 2px 8px 1px rgb(64 60 67 / 24%);
        float: right;
    }
    .layui-layer-setwin {
        /* right: 0;
        top: 3px; */
        right: 9px;
        top: 9px;
        width: 20px;
        height: 20px;
        cursor: pointer;
    }
    .layui-icon-search {
        font-size: 20px;
        color: white;
    }
    .layui-icon-search, .layui-icon-search:hover {
        background-color: unset;
    }
    @media screen and (max-width:768px) {
        .balllist .balllist-a .plist{padding:3px;}
        .balllist .balllist-a .plist .plist-title{padding-bottom:2px;font-size:14px}
    }
    .layui-flow-more {position:absolute;left: calc(50% - 60px);width:120px;}
    #demo3 {margin-top:27px;display: flex;justify-content: center;}
    #demo3 .layui-laypage .layui-laypage-curr .layui-laypage-em{background-color: #36648a;}

    /*分页*/
    .pagination{height: 20px;line-height:20px;}
    .pagination li { float: left;text-align:center;cursor:pointer; padding: 0px 5px;}
    .pagination li a{width:100%;height:100%;display:inline-block;text-decoration: none;}
    .pagination .disabled{color:#e2e2e2}
    .pagination .active{text-decoration: underline;}
    .balllist .balllist-a a{display:block;}
    .balllist .balllist-a a:hover{color:#36648A;}
    .balllist .balllist-a a:hover .plist{border:1px solid #36648A;}
    .balllist-a{
        padding: 5px 8px;
        font-family: Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;
    }
    .balllist-h{
        margin-left: 5px;
        padding-bottom:2px;
    }

    .plist{
        height: 100px;
        border:1px solid #ccc;
        border-radius: 8px;
        padding:10px 5px 5px 5px;
        display: flex;
    }
    .plist-left{
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .plist-right{
        flex:3;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .plist-title{
        width: 100%;
        padding-bottom: 5px;
        font: 14px/16px Titillium Web,sans-serif;
    }

    .plist-desc{
        color: #333;

        line-height:16px;
    }
    .plist-icon img{
        max-height: 75%;
        max-width: 75%;
        object-fit: contain;
        object-position: 50% 50%;
    }
    .balllist a{text-decoration:none;}

    @media screen and (max-width:768px) {
        .balllist .balllist-a .plist{padding:3px;}
        .balllist .balllist-a .plist .plist-title{padding-bottom:2px;font-size:14px}
    }
    .layui-flow-more {position:absolute;left: calc(50% - 60px);width:120px;}
    #demo3 {margin-top:27px;display: flex;justify-content: center;}
    #demo3 .layui-laypage .layui-laypage-curr .layui-laypage-em{background-color: #36648a;}


    /*分页*/
    .pagination{height: 20px;line-height:20px;}
    .pagination li { float: left;text-align:center;cursor:pointer; padding: 0px 5px;}
    .pagination li a{width:100%;height:100%;display:inline-block;text-decoration: none;}

    .pagination .disabled{color:#e2e2e2}
    .pagination .active{text-decoration: underline;}
</style>

<div class='pc-list' style='font: 12px/14px arial,helvetica,sans-serif;'>
    <div style="background-color:#fff !important">
        <!-- 左侧筛选 -->
        <div class='list-left' id="list-left" style="width: 248px;float:left;position:sticky;top:61px;position:-webkit-sticky;">
            <div id="list-left-a" style="overflow-x:hidden;overflow-y:auto;height: calc(100vh - 61px);border:1px solid #E4E3E2;width:98%;margin-left:1%;border-radius:3px;margin-bottom:5px;">
                <div style="margin:0;height:100%;">
                    {foreach $listkey as $key=>$vo }

                    <?php if($vo['is_nosearch']=='1'){  $nosearch=Db::table('lily_listkey_nosearch')->field('value,url')->where('list_key_id','=',$vo['id'])->order('seq')->select();?>
                    <div style="border-bottom: 1px solid black;padding-bottom:10px;background-color:#EFEFEF">
                        <div style="height:30px;line-height:30px;padding-left:5px">
                            <?php if(!empty($vo['alias'])){ ?><div>{:lang($vo['alias'])}</div><?php }else{ ?><div>{:lang($vo['wname'])}</div><?php }?>
                        </div>
                        <div style="padding-left:5px;background-color: #EFEFEF">
                            <div style="text-align:left;padding:3px 5px;overflow-x: hidden;width:88%;">
                                {foreach $nosearch as $k1=>$v1 }
                                <a href="{$v1['url']}" style="padding-left:5px;display: block;text-decoration: none;">
                                    {:lang($v1['value'])}
                                </a>
                                {/foreach}
                            </div>
                        </div>
                    </div>
                    <?php } ?>

                    <?php if(!empty($vo['data'])){ ?>

                    <div style="border-bottom: 1px solid black;padding-bottom:10px;background-color:#EFEFEF">

                        <div style="height:30px;line-height:30px;padding-left:5px">
                            <?php if(!empty($vo['alias'])){ ?><div>{:lang($vo['alias'])}</div><?php }else{ ?><div>{:lang($vo['wname'])}</div><?php }?>
                        </div>

                        <div style="padding-left:5px;background-color: #EFEFEF">

                            <?php if(!empty($vo['img'])){?>
                            <div style="text-align:center;margin-bottom:5px;">
                                <img style="width: 100px" src="{:Config::get('app.images_host').$vo['img']}?format=webp">
                            </div>
                            <?php } ?>

                            <?php if(count($vo['data'])>11){?>
                            <?php if($vo['is_have_input']=='1'){?>
                            <div style="text-align:center;width:90%;margin-left:3px;margin-bottom:5px">
                                <input type="text" name="sel<?php echo md5($vo['wname']);?>" placeholder="输入过滤值" onkeyup="selinput_zi('sel<?php echo md5($vo['wname']);?>')" style="border: 1px solid #ccc;border-radius:3px;height:20px;width:100%;padding-left:5px;margin-left:-3px" autocomplete="off">
                            </div>
                            <?php } ?>
                            <?php } ?>

                            <?php if($vo['is_nosearch']=='1'){?>
                            <div style="text-align:center;padding:3px 5px;border:1px solid #ccc;overflow-x: hidden;background-color:#ffffff;width:88%;">
                                {foreach $vo['data'] as $k1=>$v1 }
                                <?php
                  $nosearch=Db::table('lily_listkey_nosearch')->field('url')->where([['list_key_id','=',$vo['id']],['value','=',$v1['key']]])->find();
                                if(!empty($nosearch)){
                                $shai_url=$nosearch['url'];
                                }else{
                                $shai_url='';
                                }?>
                                <a href="{$shai_url}" class="sel<?php echo md5($vo['wname']);?>body-left-zhi selzhi" style="padding-left:5px;">
                                    {:lang($v1['key'])}
                                </a>
                                {/foreach}
                            </div>
                            <?php }else{ ?>
                            <?php if($vo['is_images']=='1'){?>
                            <div style="display:flex;  flex-wrap:wrap; align-items:center; text-align:center;">
                                {foreach $vo['data'] as $k1=>$v1 }
                                <?php if(!empty($v1['key'])&&$v1['key']!=''){
                    if(empty($get)){
                      $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                    }else{
                      $shai_url=$base_data['no_parameter_url'].'?';
                      foreach ($get as $getkey => $getvalue) {
                                if($getkey=='part_number'){ $getkey='p';}
                                if($getkey!=str_replace(' ','_',$vo['wname'])){
                                $shai_url.=$getkey.'='.$getvalue.'&';
                                }
                                }
                                if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){
                                $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                                }else{
                                $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                                }

                                }
                                $esimages=Db::table('lily_listkey_images')->where([['list_key_id','=',$vo['id']],['value','=',$v1['key']]])->find();

                                ?>
                                <div style="width: calc(100% / 2); height: 70px;">
                                    <?php if(!empty($esimages)){?>
                                    <a href="{$shai_url}"><img src="{:Config::get('app.images_host')}{$esimages['images']}" style="height: 35px; object-position: 50% 50%;"></a>
                                    <?php } ?>
                                    <a href="{$shai_url}" style="text-decoration: none;"><div>{:lang($v1['key'])}</div></a>
                                </div>
                                <?php } ?>
                                {/foreach}
                                <div style="clear:both"></div>
                            </div>
                            <?php }else{ ?>

                            <?php if($vo['is_show_block']=='1'){?>
                            <?php if(count($vo['data'])>11){?>
                            <div style="text-align:center;padding:3px 5px;border:1px solid #ccc;overflow-y:auto;overflow-x: hidden;height:170px;background-color:#ffffff;width:88%;">
                                {foreach $vo['data'] as $k1=>$v1 }
                                <?php if(!empty($v1['key'])&&$v1['key']!=''){?>
                                <div style="width:100%; height:16px;line-height:16px;cursor:pointer;text-align:left;overflow: hidden;" class="sel<?php echo md5($vo['wname']);?>body-left-div selall">
                                    <?php
                          if(empty($get)){
                            $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                          }else{
                            $shai_url=$base_data['no_parameter_url'].'?';
                            foreach ($get as $getkey => $getvalue) {
                                    if($getkey=='part_number'){ $getkey='p';}
                                    if($getkey!=str_replace(' ','_',$vo['wname'])){
                                    $shai_url.=$getkey.'='.$getvalue.'&';
                                    }
                                    }
                                    if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){
                                    $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                                    }else{
                                    $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                                    }
                                    }
                                    ?>
                                    <a href="{$shai_url}" class="sel<?php echo md5($vo['wname']);?>body-left-zhi selzhi" style="padding-left:5px; text-decoration: none;">
                                        <?php if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){?>
                                        <img id="xz-srcoll" src="{:Config::get('app.images_host')}/static/img/check_load.gif?format=webp">
                                        <?php } ?>
                                        <span>{:lang($v1['key'])}</span>
                                    </a>
                                </div>
                                <?php } ?>
                                {/foreach}
                            </div>
                            <?php }else{ ?>
                            <div style="text-align:left;padding:3px 5px;overflow-x: hidden;width:88%;">
                                {foreach $vo['data'] as $k1=>$v1 }
                                <?php if(!empty($v1['key'])&&$v1['key']!=''){?>
                                <div style="width:100%; height:16px;line-height:16px;cursor:pointer;text-align:left;overflow: hidden;" class="selall">
                                    <?php
                          if(empty($get)){
                            $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                          }else{
                            $shai_url=$base_data['no_parameter_url'].'?';
                            foreach ($get as $getkey => $getvalue) {
                                    if($getkey=='part_number'){ $getkey='p';}
                                    if($getkey!=str_replace(' ','_',$vo['wname'])){
                                    $shai_url.=$getkey.'='.$getvalue.'&';
                                    }
                                    }
                                    if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){
                                    $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                                    }else{
                                    $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                                    }
                                    }
                                    ?>
                                    <a href="{$shai_url}" class="sel<?php echo md5($vo['wname']);?>body-left-zhi selzhi" style="padding-left:5px; text-decoration: none;">
                                        <?php if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){?>
                                        <img id="xz-srcoll" src="{:Config::get('app.images_host')}/static/img/check_load.gif?format=webp">
                                        <?php } ?>
                                        <span>{:lang($v1['key'])}</span>
                                    </a>

                                </div>
                                <?php } ?>
                                {/foreach}
                            </div>
                            <?php } ?>
                            <?php }else{ ?>


                            <?php
                      if(count($vo['data'])>11){
                            if($vo['show_lie']=='1'){
                            $height='auto';
                            $width="100%";
                            }else{
                            $width=(100/$vo['show_lie']);
                            $width=$width."%";
                            $height="calc(16px * ".$vo['lie_num'].")";
                            }
                            }else{
                            $height='auto';
                            $width="100%";
                            }
                            ?>
                            <div style="display:flex; flex-direction: column; flex-wrap:wrap; height:{$height};  align-items:center; text-align:left;">
                                {foreach $vo['data'] as $k1=>$v1 }
                                <?php if(!empty($v1['key'])&&$v1['key']!=''){?>
                                <div style="width:{$width}; height:16px;line-height:16px;cursor:pointer;text-align:left;overflow: hidden;" class="selall">
                                    <?php
                        if(empty($get)){
                          $shai_url=$base_data['no_parameter_url'].'?'.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                        }else{
                          $shai_url=$base_data['no_parameter_url'].'?';
                          foreach ($get as $getkey => $getvalue) {
                                    if($getkey=='part_number'){ $getkey='p';}
                                    if($getkey!=str_replace(' ','_',$vo['wname'])){
                                    $shai_url.=$getkey.'='.$getvalue.'&';
                                    }
                                    }
                                    if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){
                                    $shai_url=rtrim(rtrim($shai_url,'&'),'?');
                                    }else{
                                    $shai_url=$shai_url.trim(str_replace(' ','_',$vo['wname'])).'='.trim($v1['key']);
                                    }
                                    }
                                    ?>

                                    <a href="{$shai_url}" class="selzhi" style="padding-left:5px; text-decoration: none;">
                                        <?php if(isset($get[str_replace(' ','_',$vo['wname'])]) && $get[str_replace(' ','_',$vo['wname'])]==$v1['key']){?>
                                        <img id="xz-srcoll" src="{:Config::get('app.images_host')}/static/img/check_load.gif?format=webp">
                                        <?php } ?>
                                        <span>{:lang($v1['key'])}</span>
                                    </a>
                                </div>
                                <?php } ?>
                                {/foreach}
                            </div>
                            <?php } ?>
                            <?php } ?>

                            <?php } ?>



                        </div>
                    </div>
                    <?php } ?>
                    {/foreach}
                </div>

            </div>
        </div>

        <!-- 右侧主体内容 -->
        <div class="list-right" style="width: calc(100% - 248px);;float: right;padding-bottom: 0px;">
            <div style="padding: 2px 5px">
                <!-- 面包屑 -->
                <div class="layui-breadcrumb" lay-separator="/" style="visibility: visible;padding-top: 5px;">
                    {foreach $crumbs as $k=>$v }
                    <?php if($k!=count($crumbs)-1){?>
                    <a href="/{$v['crumbs_url']}" style="font: 12px/14px arial,helvetica,sans-serif;color:#36648A">{$v['alias_name']}</a>
                    <?php }else{ ?>
                    <a style="font: 12px/14px arial,helvetica,sans-serif;"><cite>{$v['alias_name']}</cite></a>
                    <?php } ?>
                    {/foreach}

                </div>

                <!-- 筛选信息 -->
                <?php if(!empty($get)){?>
                <div style="padding:5px 10px">
                    <div style="display:inline-block;color:#36648a;cursor:pointer;" onclick="clearall()">{:lang('Clear All')}</div>
                    {foreach $get as $key=>$vo }
                    <?php
            if($key=='part_number'){
              $key='Part_Number';
            }
          ?>
                    <div style="display:inline-block;margin-left:10px;border:1px solid #ccc;padding:0px 5px;border-radius:3px">
                        <span>{:lang(str_replace('_',' ',$key))}</span> | <span>{:lang($vo)}</span> <i class="layui-icon layui-icon-close" style="font-size:12px;margin-top:2px;cursor:pointer;" onclick="del_search('{$key}','{$vo}')"></i></div>
                    {/foreach}
                </div>
                <?php } ?>

                <div style="background-color: #EFEFEF;height:32px;line-height:32px;">
                    <h1 style="display: inline;font-size:18px;padding-left:5px">{$lily_brand['name']}</h1>
                    <span style="padding: 0px 20px">{$table_count}产品</span>
                    <!-- <div style="float: right;">
                        <span style="padding: 0px 20px">
                            <a href="/ball-bearing/miniature-bearing/cross-reference-charts/">Part Number Interchange Chart</a>
                        </span>
                    </div> -->
                </div>
                <?php if(($lily_brand['id'] == 13 || $lily_brand['id'] == 35)&&!$get){?>
                <div id="search" class="{$lily_brand['id']}">
                    <div class="input-box">
                        <input type="text" placeholder='Search by part number <?php
              if($lily_brand['id'] == 13) {
                        echo "\"KAA10AG0\"";
                        }elseif($lily_brand['id'] == 35) {
                        echo "\"FR0\"";
                        }
                        ?>'
                        value="" class="layui-input" />
                        <div class="input-box-right">
                            <span class="layui-layer-setwin"><i class="layui-icon layui-icon-search" id="layui-icon-search" onclick="sear_part()"></i></span>
                        </div>
                    </div>
                </div>
                <?php } ?>

                <!-- 页面描述 -->
                <?php
          $getnumber=0;
          if(empty($get)){
            $getnumber=0;
          }else{
            $getnumber=count($get);
          }
        ?>
                <?php if($getnumber<=1){?>
                <?php if(empty($get)){?>
                <?php if(!empty($classify_content['total_des'])){?>
                <div id='gengduoli'>
                    <div class='gengduoli'>
                        <!-- 以</p>标签分组 若没有该标签直接显示 若存在 默认显示第一个<p>标签 其余的以点击more形式展示 -->
                        <?php $content_ex=explode("</p>",htmlspecialchars_decode($classify_content['total_des']));if(count($content_ex)>3){?>
                        {:htmlspecialchars_decode($content_ex[0])."</p>"}{:htmlspecialchars_decode($content_ex[1])."</p>"}{:htmlspecialchars_decode($content_ex[2])."<span style='cursor:pointer;color:#36648a;font-style:italic;' id='detailmoreid'>More</span></p>"}
                        <div style="display:none" id='detailmore'>
                            <?php for($i=3;$i<count($content_ex);$i++){?>
                            <?php if($i+1==count($content_ex)){?>
                            {:htmlspecialchars_decode($content_ex[$i])."<span style='cursor:pointer;color:#36648a;font-style:italic;' id='detailcloseid'>Close</span></p>"}
                            <?php }else{ ?>
                            {:htmlspecialchars_decode($content_ex[$i])}
                            <?php } ?>
                            <?php } ?>
                        </div>
                        <?php }else{ ?>
                        {:htmlspecialchars_decode($classify_content['total_des'])}
                        <?php } ?>
                    </div>
                </div>
                <?php } ?>
                <?php }else{ ?>
                <?php if(!empty($classify_content['filter_total_des'])){?>
                <div id='gengduoli'>
                    <div class='gengduoli'>
                        <!-- 以</p>标签分组 若没有该标签直接显示 若存在 默认显示第一个<p>标签 其余的以点击more形式展示 -->
                        <?php $content_ex=explode("</p>",htmlspecialchars_decode(str_replace('[SEOstr]',$SEOstr,$classify_content['filter_total_des'])));if(count($content_ex)>1){?>
                        {:htmlspecialchars_decode($content_ex[0])."</p>"}{:htmlspecialchars_decode($content_ex[1])."<span style='cursor:pointer;color:#36648a;font-style:italic;' id='detailmoreid'>More</span></p>"}
                        <div style="display:none" id='detailmore'>
                            <?php for($i=2;$i<count($content_ex);$i++){?>
                            <?php if($i+1==count($content_ex)){?>
                            {:htmlspecialchars_decode($content_ex[$i])."<span style='cursor:pointer;color:#36648a;font-style:italic;' id='detailcloseid'>Close</span></p>"}
                            <?php }else{ ?>
                            {:htmlspecialchars_decode($content_ex[$i])}
                            <?php } ?>
                            <?php } ?>
                        </div>
                        <?php }else{ ?>
                        {:htmlspecialchars_decode(str_replace('[SEOstr]',$SEOstr,$classify_content['filter_total_des']))}
                        <?php } ?>
                    </div>
                </div>
                <?php } ?>
                <?php } ?>
                <?php } ?>

                <!-- 下方表格 -->
                <div style="margin-top:3px;">
                    <div class="posit-boxs" style="margin-bottom: 20px">
                        {foreach $table_products as $key=>$value }

                        <!-- 分类名称 链接 简单描述 -->
                        <div style="position:-webkit-sticky;position:sticky;top:60px;z-index:10;">
                            <div style="background-color:#ffffff;padding: 5px 0px 5px 3px;">
                                <img style="height:42px;padding: 0px 5px" src="{:Config::get('app.images_host').$value['class']['img']}?format=webp" alt="{$value['class']['cname']}">
                                <?php if(empty($value['class']['alias_name'])){?>
                                <a href="/{$value['class']['url']}" style="font-size:13px;">{$value['class']['cname']}</a>
                                <?php }else{ ?>
                                <a href="/{$value['class']['url']}" style="font-size:13px;">{$value['class']['alias_name']}</a>
                                <?php } ?>
                                <?php if(!empty($value['classify_content']['tab_title_des'])){?>
                                <span style="font-style: italic;margin-left:10px">{$value['classify_content']['tab_title_des']}</span>
                                <?php } ?>
                            </div>
                        </div>

                        <!-- 主体表格 -->
                        <div style='display:inline-table;position:relative;padding-bottom:20px;'>

                            <!-- 表头 -->
                            <div style="background-color:#EFEFEF;display:table-row;" id='sdsds'>
                                <div style="color:#333;display:table-cell;vertical-align: middle;padding:5px 10px 5px 3px;border-bottom:1px solid black;position:-webkit-sticky;position:sticky;top:112px;background-color:#EFEFEF;max-width: 150px;word-break:break-all;">Part Number
                                </div>
                                <?php if(isset($value['table_title'])&&$value['table_title']){ ?>
                                {foreach $value['table_title'] as $v=>$k }

                                <div style="color:#333;display:table-cell;vertical-align: middle;padding:5px 10px 5px 3px;border-bottom:1px solid black;position:-webkit-sticky;position:sticky;top:112px;background-color:#EFEFEF;max-width: 150px;word-break:break-all;">
                                    <!-- 每个表头内容在哪里换行判断，防止表格宽度过宽 -->
                                    <?php
                        $new_space_str='';
                        $space=explode(' ',trim($k));
                        $space_i=0;
                        $new_space=array();
                        if(count($space)<=2){
                            if(count($space)==1){
                              $new_space[$space_i]=$space[0];
                            }
                            if(count($space)==2){
                              $a=$space[0]." ".$space[1];
                              if(strlen($a)>10){
                                    $new_space[0]=$space[0];
                                    $new_space[1]=$space[1];
                                    }else{
                                    $new_space[$space_i]=$space[0]." ".$space[1];
                                    }
                                    }
                                    }else{
                                    if(count($space)>=5){
                                    if(count($space)%3!=0){
                                    for($space_i=0; $space_i < count($space)-1; $space_i++) {
                                    if($space_i%3==2){
                                    $new_space[]=$space[$space_i-2]." ".$space[$space_i-1]." ".$space[$space_i];
                                    }
                                    }
                                    $new_space[]=$space[count($space)-1];
                                    }else{
                                    for($space_i=0; $space_i < count($space); $space_i++) {
                                    if($space_i%3==2){
                                    $new_space[]=$space[$space_i-2]." ".$space[$space_i-1]." ".$space[$space_i];
                                    }
                                    }
                                    }
                                    }else{
                                    if(count($space)%2==1){
                                    for($space_i=0; $space_i < count($space)-1; $space_i++) {
                                    if($space_i%2==1){
                                    $new_space[]=$space[$space_i-1]." ".$space[$space_i];
                                    }
                                    }
                                    $new_space[]=$space[count($space)-1];
                                    }else{
                                    for($space_i=0; $space_i < count($space); $space_i++) {
                                    if($space_i%2==1){
                                    $new_space[]=$space[$space_i-1]." ".$space[$space_i];
                                    }
                                    }
                                    }
                                    }

                                    }

                                    foreach ($new_space as $new_space_k=>$new_space_v) {
                                    $new_space_str.=$new_space_v."<br/>";
                                    }
                                    echo substr($new_space_str,0,-5);
                                    ?>
                                </div>

                                {/foreach}
                                <?php } ?>
                                
                            </div>
                            <!-- 表格里的内容 -->

                            {foreach $value['detail'] as $k=>$v }
                            <a class='delail_list' style="display:table-row;color:#333;text-decoration:none" href="/products/{$v['url_product']}/">
                                <div class="Part_No" style="display:table-cell;padding:0px 10px 0px 3px;" class="Product">{$v['part_number']}</div>
                                {foreach $v as $k1=>$v1 }
                                <?php if(isset($value['table_limit'])&&$value['table_limit']&&in_array(str_replace('_',' ',$k1),$value['table_limit'])) {
                  $class = '';
                  if(isset($get[$k1])){
                    $class = 'gaol';
                  }
              ?>

                                <?php if(!empty($v1)){?>
                                <!-- 在筛选内容中 添加class="gaol" 高亮显示 -->
                                <div class="{$class}" style="display:table-cell;padding:0px 10px 0px 3px;">{:lang($v1)}</div>
                                <?php }else{ ?>
                                <div class="{$class}" style="display:table-cell;padding:0px 10px 0px 3px;">-</div>
                                <?php } ?>
                                <?php } ?>
                                {/foreach}
                               
                            </a>
                            {/foreach}

                        </div>
                        {/foreach}
                    </div>
                </div>
            </div>
        </div>



        <div class="clear"></div>
    </div>
</div>


{include file="index@public/footer" /}

<script type="text/javascript">
    /*左侧筛选*/
    function selinput_zi(k) {
        let zhi=$('input[name="'+k+'"]').val();
        if(zhi != ''){
            zhi = zhi.toUpperCase();
            $(`.${k}body-left-div`).hide().filter(function(index){
                return $(`.${k}body-left-zhi`+":contains('"+zhi+"')", this).text();
            }).show();
        }else{
            $("."+k+"body-left-div").show();
        }
    }
    $(".layui-input").on("keyup", function (e) {
        if (e.keyCode == 13)
            sear_part()
    });
    function sear_part(){
        layer.load(1);
        var Part_No=$.trim($('#search input').val());
        var class_id=$.trim($('#search').attr('class'));

        if(Part_No==''){
            layer.closeAll('loading');
            layer.msg('Please enter the Part No');
            return false;
        }
        $.post('/index/Api/check_part_number3/',{Part_No:Part_No,brand_id:class_id},function(res){
            if(res.status=='1'){
                var url = window.location.href;
                window.location.href=url+"?p="+Part_No;
            }else{
                layer.msg(res.msg);
                $('#search input').val('');
                layer.closeAll('loading');
            }
        })
    }

    /*清空*/
    function clearall() {
        layer.load(1, {
            shade: [0.1, '#fff'],
            success: function() {
                setTimeout(function() {
                    var url = window.location.href; //获取当前页面的url
                    if (url.indexOf("?") != -1) { //判断是否存在参数
                        url = url.replace(/(\?|#)[^'"]*/, ''); //去除参数
                    }
                    window.location.href = url;
                }, 1000);
            }
        });
    }

    /*单个清空*/
    function del_search($k, $v) {
        if($k=='Part_Number'){
            $k='p';
        }
        var url = window.location.href; //获取当前页面的url
        let arrUrl = [];
        let changUrl = ''
        if (url.indexOf("?") != -1) { //判断是否存在参数
            arrUrl = url.split('?')[1].split('&')
            //获取参数转换为object
            for (var i = 0; i < arrUrl.length; i++) {
                arrUrl[i] = arrUrl[i].split("=");
            };
            for (var i = 0; i < arrUrl.length; i++) {
                if(arrUrl[i][0]==encodeURI($k)){
                    arrUrl.splice(i,1);
                }
            }
            if(arrUrl.length == 0){
                url = url.split('?')[0];
            }else{
                for (var i = 0; i < arrUrl.length; i++) {
                    changUrl+=arrUrl[i][0]+'='+arrUrl[i][1]+'&';
                }

                url=url.split('?')[0]+'?'+changUrl.slice(0, changUrl.length - 1);
            }
            window.location.href=url;
        }
    }

</script>